package com.example.module_home.api

import com.example.lib_net.HttpRetrofitAnnotation
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn


import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton


@Module //声明当前是一个Hilt模块
@InstallIn(SingletonComponent::class) //声明当前类的作用域是整个应用
object HomeHiltModel {

    @Provides
    @Singleton
    fun getHomeServerModel(@HttpRetrofitAnnotation retrofit: Retrofit): HomeApiServer{
        return retrofit.create(HomeApiServer::class.java)
    }
}